package com.haorui.lygyd.employeemanager.controller;
import com.haorui.base.core.controller.BaseController;
import com.haorui.lygyd.employeemanager.dto.YuangongdingdanDto;
import com.haorui.lygyd.employeemanager.entity.YuangongdingdanEntity;
import com.haorui.lygyd.employeemanager.service.YuangongdingdanService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @support: 西安鑫正豪信息技术有限公司
 * @author: 系统生成
 * @version: 1.0
 * @Date: Wed Feb 27 00:27:27 CST 2019
 * @Description: 员工订单
 */
@RestController
@RequestMapping(value = "/yuangongdingdan")
public class YuangongdingdanController extends BaseController<YuangongdingdanEntity,YuangongdingdanDto> {
    private YuangongdingdanService yuangongdingdanService;
    public YuangongdingdanController(@Autowired YuangongdingdanService yuangongdingdanService) {
        super(yuangongdingdanService);
        this.yuangongdingdanService=yuangongdingdanService;
    }

    @ApiOperation(value = "结算成功", notes = "结算成功", position = 2)
    @RequestMapping(value = "/settlementSuccess", method = RequestMethod.POST)
    public void  settlementSuccess(@RequestBody String[] ids) {
        yuangongdingdanService.jiesuanchenggong(ids);
    }

    @ApiOperation(value = "结算失败", notes = "返回修改后的会员信息", position = 2)
    @RequestMapping(value = "/settlementFail", method = RequestMethod.POST)
    public void  settlementFail(@RequestBody String[] ids) {
        yuangongdingdanService.jiesuanshibai(ids);
    }
}
